date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,327,195,646,000
I'm trying to play an audio CD in Debian but each time I insert the CD, while there appears an icon with the CD in the screen, when I try opening it I get the message: Failed to mount "Audio CD". Location is not mountable. I've been searching since yesterday but as I see there is a general problem with audio CDs beca...
You could try to use these commands in the terminal: mkdir /mnt/cd && mount /dev/cdrom /mnt/cd Else try this in the terminal: sudo mkdir /mnt/cd && sudo mount /dev/cdrom /mnt/cd Or, if mkdir works: mkdir /mnt/cd && sudo mount /dev/cdrom /mnt/cd Or, if the directory has already been created: sudo mount /dev/cdrom /...
Audio cd doesn't play
1,327,195,646,000
I need to check if a lot of audio CDs are damaged or not and would prefer not to have to listen to them all. Is there a good way to do this quickly?
cdparanoia can attempt to rip the audio data to a null device, and as a side effect tell you how damaged the discs are. cdparanoia -q -p -X 1- /dev/null
Detect damaged audio CD
1,327,195,646,000
I'm running a debian 9.2 machine with a Plextor PX-716A DVD-Drive as /dev/sr0. I would like to rip a music CD to MP3 using abcde. When I try to to launch abcde : $ abcde -V -d /dev/sr0 CDDB method 0: cddb Executing customizable pre-read function... done. Getting CD track info... [WARNING] something went wrong while qu...
After trying with another DVD Drive I was able to rip using abcde. So I can answer my own question and confirm the suggestion of Stephen, my first drive is broken. I lost time, but I learned a few things. Hope my investigation described above helps someone.
Unable to read an audio CD in Debian 9.2
1,327,195,646,000
I have audio CD in Nero .nrg file format (created on Microsoft Windows), and want to burn it on physical Audio CD medium. nrg2iso(1) Debian package produces .iso image which doesn't work (nor is it supposed to, according to wikipedia article above, as it is not Data CD). I've had some luck with mplayer --cdrom-device=...
As I try hard to avoid running non-free software (such as Nero), and I prefered command-line to GUI in this case, I've found other solution. I installed libcdio-utils Debian package, and then used: cd-info cdimage.nrg to get information about NRG file which looked sane. Afterwards I used cd-paranoia from same package...
Burning audio CD from .nrg file
1,327,195,646,000
I've got a USB 2.0 CD/DVD drive, which is (amongst other use cases) used to play music CDs. But: The drive seems to ignore CDROMPLAYMSF commands. The host is a Raspberry Pi 3B with the current version of Raspbian. I'm using libcdaudio for audio CD playback, which in turn issues the necessary ioctl commands, including ...
Originally CD ROM drives (in the IDE era) had an analog audio connection to the motherboard. The SCSI commands PLAY, STOP, SCAN and their variants would then play audio CDs to this analog output just like a standalone CD player. The CDROMPLAYMSF ioctl issues one of those SCSI commands, namely PLAY AUDIO MSF. MSF defi...
What does the ioctl CDROMPLAYMSF command do exactly?
1,327,195,646,000
I have a hard time using Linux' built-in tools to rip an audio cd (sound juicer, rhythmbox). The reason likely being my drive, which vibrates a lot and cannot read the disk continuously. Playing the disk in any audio player results in short pauses and stutter-y playback. Ripping the CD results in noticeable artefacts....
To rip an audio CD you should really use a tool such as cdparanoia. This will handle jitter and error correction, will retry as necessary, and try to create a "perfect" datastream. Typically you would use this to create the wav files, which can then be converted to FLAC format as necessary. There are other tools, incl...
How can I copy a .wav file from an audio cd and verify it?
1,327,195,646,000
A lot of players can get CDDB info about Audio CDs, but I have never seen that in Clementine. Given the prestige and other qualities of this player It's hard to believe that it lacks this feature. Is it?
Based on perusal of the issues on Clementine's GitHub page, it looks like Clementine should have CDDB support, per Issue#1239 (which is marked as a duplicate of Issue#314). The closing comments of Issue #314 indicate that Clementine uses the libtunepimp library for talking to the MusicBrainz service for this tagging c...
Can Clementine music player fetch CDDB/FreeDB data?
1,327,195,646,000
I have been struggling for months on how to add mp3 tags readable by (of all things) Android? (mp3info doesn't seem to set the fields in a way readable by Android music players, and neither does RhythmBox). So far, my most success has been the embarrassment of ripping the CD from a Windows machine, letting it auto-rec...
The mp3info program only writes ID3 v1 tags. Android has started looking at just the v2 tags. You should use the id3v2 program to write tags from the command line that will get recognized in most modern systems. For a GUI music tagger I recommend EasyTAG. Also, grip will rip audio cd's to mp3 and write tags using cddb...
mp3info fails to make MP3 data fields readable by Android
1,327,195,646,000
I'm starting the longish process of ripping my CD collection. I've got abcde installed with the config from Andrew's Corner. It seems to be working ok but when the metadata fetch fails, the MP3s get written as Unknown Artist and Unknown Album. Which isn't a problem until the second metadata fetch fails. Then the track...
You could automate the process by wrapping the abcde with a script that invokes abcde and checks for 'Unknown Artist/Unknown Album' directory existence after abcde completion. If the test shows that directory exists then rename it with a name that includes the disk CDDB ID which you can get with cd-discid tool. This s...
How do I prevent my cd ripper from overwriting Unknown Album when metadata can't be found
1,327,195,646,000
This should be possible, given that the latest Qmmp player has a CD plugin with options regarding CD tracks info - both CD-Text and CDDB. But I see no menu option like 'Open CD' etc. Is it there? When trying to use 'Open files' to select Audio CD in the File browser, there is a message 'You can only select local file...
As indicated here, a solution would be to use the 'File - Add URL' option, and there add cdda:///. But that is a bit cumbersome, so, to have that with a click or two: In KDE: Tested in KDE4. System Settings - Device Actions - Add, and add the command : qmmp cdda:///. Now, upon inserting an audio CD, one of the Audio ...
How to open Audio CD in Qmmp player?
1,327,195,646,000
Many Linux players (like Audacious, Banshee, Amarok, Exaile) can easily access audio CDs tracks info (names and other metadata) but Deadbeef cannot, although it has a cdda plugin that should do just that. Along VLC, Amarok, Rhythmbox, Xine and Kaffeine, Deadbeef is one of the players that can read CD-Text (tracks in...
The problem is with the option "Prefer CD-Text over CDDB" (under Preferences-Plugins-Audio CD player-Configure): that should NOT be checked. When it was, instead of preferring CD-Text when available, it just showed CD-Text and never CDDB info. And as CD-Text is usually absent, it showed generic names of tracks ('Trac...
Deadbeef audio player does not retrieve online (freedb, CDDB) info about CD tracks
1,327,195,646,000
I am trying to burn an Audio CD to be playable on old vintage CD Players.  I have tried using Brasero Audio CD and XfBurner, to no avail.  The resulting CD is playable only on some newer players. I have a CD (that I got from someone) which works.  So I analyzed it using cd-info. This is the information about the worki...
Green? is a bit obscure, but looking at the source code and then libcdio programming documentation helps: it seems to refer to whether or not the track contains CD-ROM XA data and therefore is CD-I (Green Book) compatible. The original CD-ROM format is known as Mode 1, and XA is known as Mode 2. There are two sector ...
What do Green and Copy mean in CD-INFO?
1,327,195,646,000
When I insert a DVD into the drive on my PC under Fedora 33, vlc opens the disk automatically and begins to play it. When I insert a CD (audio or data), the drive spins up and the light blinks, but the disk fails to automount. The disk doesn't appear in Rhythmbox or Files. When I try to mount with mount /dev/sr0 /tm...
CDs and DVDs require different wavelengths of light. In your drive there is one laser for CD, another for DVD. My guess is the one for CD is dead. Or some other component used exclusively for CDs is dead, it makes no difference in practice. I used to have a drive that stopped reading CDs while still being able to read...
Can't play CD on fedora: no medium found on /dev/sr0
1,327,195,646,000
I have two Audio CDs to prepare for my upcoming English test. I can play the first CD by execute vlc cdda:// in konsole (I use Arch Linux with KDE). I also note that the Audio CD appears in the Devices panel in Dolphin. Unfortunately, for the second CD, nothing appears in Dolphin and I also can't play this CD with vlc...
Well, here's your error: ++ WARN: error in ioctl CDROMREADTOCHDR: No medium found It seems your medium is either non-redbook compliant, is faulty or damaged, or your drive is faulty (seems less likely considering the other CD works). If your CD works on another audio player, it may be that it contains Digital Restric...
Can not play Audio CD in Arch Linux
1,327,195,646,000
I would like to be able to rip a CD through the command line (using cdparanoia and lame, preferably) without having to use temporary files. I'm thinking that this would save some time with the encoding process, but if this isn't the case, please let me know. So far, I've tried cdparanoia 1 - | lame -f --silent - trac...
Depends on filesystem caching. If the wav file is deleted right away, it may never be written to disk in the first place. In such a case there should not be a noticeable difference to piping directly. If you have enough free RAM you could always do it in a tmpfs/ramdisk and only copy the final result to the real files...
CD Ripping Without Temporary Files
1,327,195,646,000
This question is created to share a simple and interesting solution related to this great player.
As indicated here, the command is deadbeef all.cda
Start playing an audio CD in Deadbeef player with a command
1,327,195,646,000
I should restrict this question to KDE, but the non-KDE-specific players may very well work. I am surprised how many Linux audio players (and video/multimedia players too) lack the simple option of accessing and opening a music CD that was inserted in the CD drive. I mostly use Deadbeef and Clementine, and they do ha...
I have posted in the question some players that, oddly enough, lack a "Open CD" option. Wile not having that option, Rhythmbox and Banshee should be able to access the CD drive in the list of drives, but I will leave them aside for the moment. (Rhythmbox should be able to display a music CD in the list of drives unde...
Music players that have 'Open CD' option and that show tracks' titles?
1,433,957,761,000
In older versions I used to comment out osd.show(percent) in the functions increaseVolume and decreaseVolume in the file /usr/share/plasma/plasmoids/org.kde.plasma.volume/contents/ui/main.qml (blog source). But that file does not exist anymore in Plasma 5.13. Is there an other way to disable it?
Right-click the volume icon in the tray and select Configure KMix…. Unselect Show On Screen Display (OSD) then click OK (or Apply). This is equivalent to editing ~/.config/kmixrc and adding the line: showOSD=false
How to disable the volume popup in KDE Plasma 5.13?
1,433,957,761,000
I'm frequently changing the audio setup of my laptop (sometimes using the built-in jack port, sometimes nothing at all, sometimes using USB headphones, sometimes using the jack port in the dock of my laptop). I'd like to have keyboard shortcuts to lower or increase volume for all outputs at once, so it works no matter...
You need a script to do this. There are scripts like this that control the default sink, but I haven't seen one that controls all sinks. You can get a list of all sinks with pacmd list-sinks, and set the volume with pacmd set-sink-volume, so you need to do something like VOLUME='+5%' for SINK in $(pacmd list-sinks | g...
Lower or increase pulseaudio volume on all outputs
1,433,957,761,000
On my laptop, when I press the volumeup/volumedown key, the sound lever go up/down by 10 units. I can check that with alsamixer: when I press volume up, the sound level indeed go up by 10 points. But I would like these keys to be less sensible: it would be nice if the level could go up/down by 5 points when I press a ...
As far as i am concerned this is not a pulseaudio thing and depends on which DE or WM you are using I have never used a DE with arch but for WM's this is configured in their configuration files like for i3 (~/.config/i3/config) #change volume bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ bindsym XF86Aud...
How can I set the amount by which the sound keys increase/decrease volume?
1,433,957,761,000
$ neofetch OS: Pop!_OS 21.10 x86_64 Kernel: 5.15.8-76051508-generic I have two Bluetooth devices: a speaker SoundCore Boost and headphones EDIFIER W830BT. When I'm trying to change the volume on headphones using system volume settings it does work. Headphones also have buttons on them for controlling volume and thos...
Disable absolute volume in Pulseaudio's config. Edit the file /etc/pulse/default.pa And change the line load-module module-bluetooth-discover to load-module module-bluetooth-discover avrcp_absolute_volume=false Credit for this solution goes to https://www.reddit.com/user/mmstick/ https://www.reddit.com/r/pop_os/co...
Bluetooth speaker volume control doesn't work (but muting does work)
1,433,957,761,000
I'm using Kubuntu and need to increase my volume beyond 100% on many youtube videos, because the recording level was too low, and my speaker is capable of generating much louder volume.
ffmpeg -i inputfile -vcodec copy -af "volume=10dB" outputfile would increase volume by 10dB VLC allows you to watch a network stream, you enter a youtube URL and you can increase the volume to 125% - I read to 200%.
How to increase volume beyond 100% on Kubuntu KDE
1,433,957,761,000
I'm using Debian 8 with Openbox which comes with PulseAudio by default. And I cannot find a volume icon which works properly. I try Volti (the volume becomes very low and sometimes doesn't work), Pavucontrol (doesn't have a volume icon) and try to compile pa-applet (I can't compile then! Many others have the same prob...
I have tried again to compile the pa-applet (it aren't on Debian repository) and looking in the "issue" of his project on GitHub, I find a fork that a dude made and he fix the problem of compiling that I have. So, case closed. If you are looking for an icon volume, just compile the pa-applet through the original proje...
Volume icon for PulseAudio on Tint2 -- nothing works!
1,433,957,761,000
I run Debian 9 with LXQt what is completely fine. However, attached USB-volumes are not getting displayed in the PCManFM-Qt sidebar in category Devices intended for that (see screenshot). Which package is responsible for that? I activated all three necessary options in Preferences -> Volume, but the drives still don't...
Merely the package gvfs-backends was missing. This package is responsible for virtual filesystems in userspace. After installation everything works fine!
Debian 9: USB-volumes are not displayed in PCManFM-Qt's sidebar
1,433,957,761,000
One time when I rebooted my computer, suddenly, the audio won't change and the audio settings only say No output or input devices found. I have replaced pulseaudio with pipewire, but it stilled worked after a reboot following the replacement. When using kmix and rebooting again, the audio can be changed, but the audio...
Apparently, I had PULSE_SERVER="" in my /etc/environment file. I removed that line and rebooted. Then, everything worked.
Cannot change volume or access audio settings in KDE Plasma suddenly
1,433,957,761,000
Below is pavucontrol GUI. As you can see, volume is 100%. I can use the knob of my Roccat external keyboard, to change it to any value between 0% and 100%. Now I do the following set it to something lower than 100%, say 69%, suspend the system via systemctl suspend wake the system up At this point, the keyboard knob...
The problem is that the knob was working because of a configuration done in the context of the i3 window manager that I use, and long long ago I had botched the configuration. These are the culprits: bindsym XF86AudioRaiseVolume exec amixer -q set Master 1%+ unmute && pkill -RTMIN+1 i3blocks bindsym XF86AudioLowerVolu...
Volume can't be increased via keyboard volume knob after suspend
1,433,957,761,000
So I have this unexpected behavior when changing volume under newest Fedora 32 (Gnome 3 default version): When I change volume, it doesn't change right away on every Fn+F2/F3 keypress - the volume actually changes once the volume change icon disappears from the screen. So if I pressed the combo a few times, the sound ...
OK, turns out it's a pulseaudio configuration issue. For some reason it had the enable-deferred-volume attribute set to "yes". Just edit /etc/pulse/daemon.conf, uncomment that param, set it to no and restart pulseaudio (or system).
Volume change in Fedora only applies when the volume icon is gone?
1,501,233,651,000
I have randomly been reading about union file system which enables a user to mount multiple filesystems on top of one another simultaneously. However, am finding trouble deciding on which one to use(Unionfs vs Aufs vs Overlayfs vs mhddfs) and why as I have not found concrete information on the subject anywhere. I kno...
Here are some thoughts - I am still learning this and will update this as I go. How to choose the union filesystem There are two ways to look at this: How do the features of each one compare? For some common use cases, which one should I choose? I'll compare unionfs / unionfs-fuse / overlayfs / aufs / mergerfs, the ...
Unionfs vs Aufs vs Overlayfs vs mhddfs, which one do I use
1,501,233,651,000
I'm using AUFS for merging 100+ branches for a project. At runtime, I frequently add or remove few branches. Now, If I have a branch named "firefox-21.0" and If I update/modify one of it's file then AUFS creats it's whiteout file (.wh). So far so good. But later, If I planned to update the firefox to new version then ...
To delete the hidden AUFS white-out files, you could: Find them, and remove them: find . -regex '.*/\.wh\.\.wh\.plnk' -delete for .plnk files find . -regex '.*/\.wh\.\.wh\.aufs' -delete for .aufs files This matches (in any subfolder) the aufs-specific files .wh ..wh.plnk and .wh..wh.aufs, but would not match -say-...
Aufs Whiteout removal
1,501,233,651,000
When I change a file in an AUFS-mount, that change gets stored somehow in the rw-layer. It is clear how new/changed files are stored in the rw-layer, but how get deleted files remembered there?
All union filesystems with read-only and read-write branches use some form of "whiteout" marker on a read-write branch to suppress a file that exists on a read-only branch. AUFS is no different. For AUFS, the whiteout markers are files called: .wh.<filename> located in the same directory where the deleted file used t...
How does AUFS store deleted files?
1,501,233,651,000
Disclaimer: I'm a newb and I need step by step guide. Thanks! I want to first install grub without OS, since it will boot from ISO file off the local network storage. I'm booted into a liveCD (I can't install it since I need a volatile system) I'm already stuck at first stage. I tried grub-install /dev/sda and I get e...
You should not need the full Linux file structure if just booting an ISO. I have installed grub to flash drive with various formats and booted ISO on that same flash drive. Not sure exact grub boot stanza required for network boot. I had an old USB2 flash drive which I reformated. I first make it gpt, as I prefer that...
How to install grub to empty disk from ubuntu liveCD
1,501,233,651,000
I'm attempting to help out a roommate who has installed Kubuntu on his Chromebook using Crouton (it's basically just a fancy chroot run within ChromeOS). I helped him get the Docker daemon running, using some advice from this issue on the Docker github: https://github.com/docker/docker/issues/1863. That involved usin...
I'm working through this same issue now. This happens because vfs is not a true union file system (like aufs), so every incremental image in the image you restore is restored to its full size. See this issue for more details: https://github.com/docker/docker/issues/14040
Docker in Crouton - VFS consuming astronomical amounts of space
1,501,233,651,000
I am trying to merge two folders that contain the same tree and bring them together in a third folder that contains a link to the contents of two different folders, it is possible with auFS? If this is not possible, is there another solution? Thank you ! dd1 └── 1 ├── a │ └── 1 ├── b ├── c │ ├...
Aufs is very old, the today's variant is overlayfs. mount -t overlay overlay -o lowerdir=/mnt/dd1/1/:/mnt/dd2/1/ /var/www/3/ It will be read only.
Merge two folders with the same tree (auFS)
1,501,233,651,000
I'm experimenting with different union/overlay filesystem types. I've found unionfs-fuse package in Ubuntu which allowed me to use unionfs mount command as non-root user. But it seems aufs, which is created to provided similar options as unionfs, cannot be used as non-root user. I need to give sudo password for aufs m...
In researching this the answer appears to be: no. In looking at the man page for aufs I don't see any options that would allow it to mount as anything but the root user. In looking at the filesystems that libfuse supports I don't see aufs listed there either. Lastly if you look at the userspace filesystems it's not...
Can aufs be used as fuse filesystem like unionfs-fuse?
1,501,233,651,000
I just tried to mount two folders in one using aufs on Debian 7 wheezy. The command I issued is the following: mkdir /test1 mkdir /test2 mkdir /test mount -t aufs -o dirs=/test1:/test2 none /test Then I wanted to see if files with the same name would conflict in the same folder, so I issued this: touch /test1/file1.t...
Each underlying filesystem is assigned a precedence. If there are duplicate filenames, the one from the higher precedence filesystem is the visible one, the others are hidden. See https://superuser.com/questions/326190/how-does-unionfs-work
Do files with equal name conflict in unionfs (aufs)?
1,501,233,651,000
Is it possible to feed the branch paths from stdin to the mount (or mount_unionfs) command, instead of supplying them as arguments or from a file? cat ~/dirs_with_photos.txt | mount -t unionfs I don't want to use /etc/fstab, because ideally I want to automatically generate these txt files dynamically, such as with a ...
Transform the input into the required syntax and splice it into the command line with a command substitution. dirs_with_photos="$(<~/dirs_with_photos.txt tr '\n' :)" if [ -n "$dirs_with_photos" ]; then unionfs-fuse "${dirs_with_photos%:}" /photos fi With mount_unionfs you need to issue one mount command per directo...
Mount unionfs (or aufs) branches fed from stdin?
1,501,233,651,000
I have two writeable directories branch1 and branch2 tied together with AUFS on Debian 8 to the mount point union. Mount options: br=branch1=rw:branch2=rw branch1 and branch2 each contain a subdirectory dir with permissions 700. When I change the permissions with chmod 755 union/dir, only the first directory branch1/d...
It sounds to me like you have done everything right, so I would suggest filing a bug against aufs. PS: Kontrollfreak has done that already, and the fix is to use the dirperm1 mount option, according to http://sourceforge.net/p/aufs/bugs/21/#1293 . Thanks for your research @Kontrollfreak .
AUFS only changes permissions of the topmost directory
1,501,233,651,000
I wish to separate the default packages configuration files (/etc/), and the configuration files I edited e.g. in /Data/etc/ (normally should be /usr/local/etc/, but let assume /Data/etc/). This to enable me to easily see the modifications I made, to easily back it up, etc. Therefore, I was wondering it was possible t...
Something like what you’re after is coming in systemd v256, systemd-confext. However that might not be usable for you for a while yet. Looking at the broader issue of tracking configuration changes (and identifying their origin as a subset of that), perhaps you could use a tool such as etckeeper. This is available in ...
Separate default configurations and my own changes with a layered FS : /Data/etc/ upper layer in RO and /etc/ lower layer in RW?
1,501,233,651,000
I have used an aufs root before on gentoo years ago, but cannot seem to get it going now. I am using genkernel-next, I would imagine I used genkernel before as well. I am using funtoo with aufs-sources and have aufs built-into the kernel (not a module). I believe I need to make some initramfs changes + command-line ...
I figured it out, actually, the easiest way was to simply modify the linuxrc script with exactly I wanted to do. In that case, I added support for both aufs and overlayfs, but have opted for overlayfs since it doesn't require a special kernel patchset which would be convenient if I want to use this method / approach ...
aufs root on gentoo/funtoo
1,328,279,373,000
I am trying to compile a gnome application and I am curious what the output means when I run the autogen.sh script: ~/Documents/Code/window-picker-applet $./autogen.sh autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal autoreconf: configure.ac: tracing autoreco...
Looks like your autogen.sh is calling autoreconf. The project may be using intltool instead but if so autoreconf should pick that up and call intltoolize. If it's definitely using GNU gettext then this from the autopoint info page is helpful: The ‘autopoint’ program copies standard gettext infrastructure files into...
configure.ac: not using gettext
1,328,279,373,000
I'm working on a project that has a custom INSTALL file. Running automake --add-missing (or more precisely, autoreconf -i) will generate the GNU default INSTALL file, and overwrite our file with it. How can I prevent this behavior? I want it to either not generate the GNU INSTALL file at all, or alternatively, create ...
The cause of the problem was the -f i.e. --force tag to autoreconf. The man page for it states: "consider all files obsolete" which is a bit vague, so I couldn't initially connect it to my problem. Its html manual entry is even more misleading: Remake even configure scripts and configuration headers that are newer th...
How to prevent automake from overwriting INSTALL?
1,328,279,373,000
I am trying to build using ./configure. I have Three include directories -I/path1/include -I/path2/include -I/path3/include Two link directories -L/path1/lib -L/path2/lib Two -l flag options -ltensorflow -lasan Two compile flags -O3 -g How can I put all these flags effectively as options in ./configure?
The canonical way to do this is to provide values for various variables in the ./configure invocation: ./configure CPPFLAGS="-I/path1/include -I/path2/include -I/path3/include" \ CFLAGS="-O3 -g" \ LDFLAGS="-L/path1/lib -L/path2/lib" \ LIBS="-ltensorflow -lasan" If the C++ compiler ...
How to put multiple -I, -L and -l flags in ./configure?
1,328,279,373,000
The source folder of rtnet contains only the above mentioned files for compilation purposes. Remaining files are the source code of the examples. Question is that do these files indicate that they have been generated through automake? If yes, then where should I look to find out what settings where made to configure a...
The presence of the .am files indicates the project is intended to be used with AutoMake. They are the source files for AutoMake, and the only ‘configuration’ files needed if you're building a project. Read through GNUMakefile.am to see how AutoMake is configured. Generally speaking, you don't need to do that in many ...
Do GNUmakefile, GNUmakefile.am, and GNUmakefile.in indicate that Automake has been used?
1,328,279,373,000
When I run sudo make install on a compiled package from the GNU archive, it uses mkdir -p to create the destination directories. I'd prefer it to use mkdir -p -m 0755 or install -d -m 0755 instead in order to ensure the destination directory has proper permissions for everyone under all circumstances, not just when th...
The macro AC_PROG_MKDIR_P is a feature test macro. It expands to shell code that tests for the best mkdir -p-capable command available. It uses MKDIR_P and ac_cv_path_mkdir (a "cache variable") to figure out what command to use. You may set the value of MKDIR_P to the command that you want to use for creating director...
How to make autoconf use "install" instead of "mkdir -p"?
1,328,279,373,000
I tried to get remove Perl from my Ubuntu machine, but found that automake not only depends on Perl but itself is a Perl program. I read somewhere this was not always the case. Today I looked in the archives, but even version 1.0 already is in Perl. Did I misread, or was automake always in Perl? Are there any drop-in ...
Automake was originally a shell script and switched in version 0.21 (see the automake history page) in November 1995. (I am not aware of a drop-in replacement)
When did Automake switch to using Perl
1,328,279,373,000
I have an Ubuntu-server 16.04 VPS and Nginx. Now I'm implementing HTTP1 (without TLS, utilizing port 80) but I desire to go "one step forward" and work with HTTP2 (with TLS, utilizing port 443), for all my (Wordpress) websites. Assuming I adjusted my environment, this way: 1. Firewall ufw app list # Choose Nginx HTTPS...
It's easy to create and update Let's Encrypt cerificates with dehydrated (https://github.com/lukas2511/dehydrated). You have to add /.well-known/acme-challenge/ location for each site as Let's Encrypt service will look on challenge responses under this location to verify that you are the owner of sites you have reques...
Automating OpenSSL certificates creation, Let'sEncrypt signing, and site dir associating, in an Nginx environment
1,328,279,373,000
I want to build a library with a specific tool instead of GCC. The regular build sequence is: ./configure make make install Where should I replace the GCC settings (I think that the configure was created with AutoMake)?
It is usually worth reading output of ./configure --help. This suggest to run configure as ./configure CFLAGS="-ggdb3 -O0" make make install Overriding CFLAGS (or LDFLAGS, CPPFLAGS, depending on your needs) as follows works as well: CFLAGS="-ggdb3 -O0" ./configure make make install If you need to use a compiler othe...
How to change the compiler settings with AutoMake?
1,328,279,373,000
I'm using autoconf and automake to build a tiny project. For the project's manual, I've used OpenBSD's native mdoc format, and the installable man-formatted manual is generated from this using the mandoc utility. The man-formatted manual will be installed as the actual manual with make install, as some systems do not...
Solution: To properly pick up the source for the manual when performing a VPATH build, the rule for it in the relevant part of the Makefile.am file should look like shell.man: $(srcdir)/shell.mdoc $(mandoc) -T man $(srcdir)/shell.mdoc >shell.man By specifying $(srcdir)/shell.mdoc, make will find the fil...
Issue with "make distcheck" in GNU autotools project relating to generating a manual
1,328,279,373,000
I am using automake on Debian Squeeze for compiling a very simple C project with 6 source files. The issue comes when I try to compile the sources using the generated Makefile. One of the sources (ll_socket.c) uses system libraries like and . Those dependencies should appear in the ".deps/ll_socket.Tpo" file automati...
Actually automake -a will take care of everything about dependencies while compiling a program. I have gone through this document 1 & 2 which explains about automake dependencies. I suggest you read that document for more information regards.
Dependencies problem with automake
1,328,279,373,000
I use sed to change text in existing files and Nano to create new files. I change text with sed this way, for example: sudo sed -i 's/TESTING === "1"/TESTING === "0"/g' /etc/csf/csf.conf Is there a way to create files with it, without going inside Nano or VI and pasting text, giving permission and then execute? Usual...
In other words, I look for either a way to run the script from paste, or to paste it into a temporary file and run it "in-place" without saving any file --- To run everything is least number of clicks and pastings. Assuming your interactive shell is a Bash or compatible shell -- you are looking for that : bash...
Create a temporary script with sed (or any other utility) for immediate script creation to run in-place
1,328,279,373,000
I am on Fedora 20. I am trying to make gnome-terminal. The automake does not find certain packages. I do not understand why. Here is the part I do not understand. checking which gtk+ version to compile against... 3.0 checking for TERM... no configure: error: Package requirements (vte-2.91 >= 0.37.0 glib-2.0 >= 2....
Every library is usually split into serveral packages such as: foo #the library foo-bin #binaries used by foo foo-dbg #debug symbols used by foo foo-dev #development stuff used by foo foo-devel #development stuff used by foo When you compile any software the respective development files of all dependent l...
Trying to automake gnome-terminal
1,328,279,373,000
I'm currently building a large package which is handled with automake. Package is composed by C,C++ and Python. So far i have good results with C/C++ but i'm blocked when it comes to python dependencies. I personnaly run a script when i'm installing, and i'd like to run it whenever make install is called. For now it's...
I eventually found a way to handle python with autotools. Makefile.am allow you to override install and uninstall like this : install-exec-local: cd src/ && python setup.py install --record $(pythondir)/installed_files.txt uninstall-local: cat $(pythondir)/installed_files.txt | xargs rm -rf \ rm -r $(sysc...
Specify script to run with install command automake
1,328,279,373,000
I have a precompiled shared object that I need to distribute with the package I'm building, how do I get automake to copy the shared object to the lib/ folder where it places all of the rest of the shared objects that it compiles during the compilation process?
This old workaround seems to be still working mylibdir = $(libdir) dist_mylib_SCRIPTS = libxxx.so
How to add a precompiled library in autotools?
1,328,279,373,000
I have problem with installing automake 1.14.1 on Rapbian (2014-09-09-wheezy-raspbian) distro. I wrote sh ./configure and then I wrote make then terminal wrote me that: $ make CDPATH="${ZSH_VERSION+.}:" && cd . && "/home/pi/LIBRARY/automake-1.14./twrap/aclocal-1.14" Can't locate /home/pi/LIBRARY/automake-1.14.1/bi...
I found out what is problem in. I use filezilla to transport automake to Raspberry Pi (running on Raspbian) in unpacked form. When I transported packed automake.tar through fillezila and then unpacked it on RPi and did installation of this one then I have no problem. However many thanks for all your answers and an eff...
Automake - problem with installing version automake-1.14.1
1,328,279,373,000
I'm attempting to install automake-1.13.4 on my system. First, I do ./configure which creates a Makefile compatible with my system. However, when I execute make, it runs for a bit, but then returns the following error message: /bin/sh: -c: line 5: syntax error near unexpected token || /bin/sh: -c: line 5: ` { || ...
I've figured it out. This error is related to the amhello-1.0.tar.gz file. The originally provided file was not configured properly for my system. Therefore, if I rebuild the file myself, and replace the original amhello-1.0.tar.gz, then I can run make with no errors. To see how to rebuild amhello-1.0.tar.gz so that i...
Error in bin/sh when installing automake-1.13
1,328,279,373,000
The autoconf AX_CHECK_X86_FEATURES will test for -mavx, -mavx2, etc and add it to CFLAGS. What is the right way to propagate it to CXXFLAGS too? Is it "clean" to always add CFLAGS to CXXFLAGS? It doesn't seem so... But my C++ code contains some avx2 code, so I need this.
You can specify your own “if found” action (this will override the default): AX_CHECK_X86_FEATURES([CXXFLAGS="$CXXFLAGS $X86_FEATURE_CFLAGS"]) or use @X86_FEATURE_CFLAGS@ directly in Makefile.am.
AX_CHECK_X86_FEATURES for CXXFLAGS
1,328,279,373,000
Slurm is an open source project using gnu autotools to build. The problem is as follows: when applying autoreconf to the project, the Makefile.in files created are missing the runstatedir macro. I'm using Fedora 32, and after filing a bug with the project owners (Schedmd) I've received a WONTFIX resolution with the fo...
The problem is that the latest stable autoconf version, 2.69, was released eight years ago, in 2012. In 2013 a Red Hat employer added the --runstatedir option (https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=a197431414088a417b407b9b20583b2e8f7363bd). But since there has not been a stable release since t...
How do I modify a debian/ubuntu based gnu autotooling build to fedora 32?
1,328,279,373,000
In Makefile.am we have: bin_PROGRAMS = sample sample_SOURCES = main.cpp sampleconfdir = $(sysconfdir)/sample sampleconf_DATA = sample.cfg whenever I install the application using make install, the file sample.cfg gets overwritten. How to tell automake to skip copy if file is already present?
It is fairly common for software to install example configurations and let the user copy and modify this configuration for use with their actual installation. By "user" I mean anyone installing the software, be it a local administrator (root) installing the software system-wide or an unprivileged user installing the ...
How to prevent automake from overwrting _DATA file
1,592,341,065,000
I have clang installed from packages on both Ubuntu 14.07, Centos 7 and Fedoara 22. I would like to use clang-tidy but can neither find a package nor how to install it without installing clang from source. That's something I would rather not do. What am I missing? I might be dense, if so please mock me.
You can use your package manager to find out which package clang-tidy provides. For example on Fedora/CentOS: dnf whatprovides '*/clang*tidy*' On Debian/Ubuntu you can use an analogous apt-file search command. However, on Fedora 23 clang-tidy just isn't packaged. No match is found. There is even an open bug report: ...
clang-tidy install
1,592,341,065,000
I know that there are similar questions for installation of clang-lower versions. But, I am trying to follow them to install clang-3.9 or 4.0 , but I am unable to do so on my Linux Mint 18. First, I was only getting options upto clang-3.8 using sudo apt-get install clang followed by pressing tab twice. Then, I follo...
Your version of Mint is based on Ubuntu 16.04, so you should use the sources for that (as documented on the repository's main page): deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main # 3.8 deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.8 ...
How to install clang 3.9 or higher using apt-get on Linux Mint?
1,592,341,065,000
A google search reveals this slashdot story yielding this github repository that hasn't had a commit since 2016. There are 22,602 forks listed on github.com but these are going to be mostly (if not virtually all) simply development forks for torvalds/linux. I have read before that Linux has become quite crufty. It see...
I am specifically wondering about the kernel and whether there are forks that eliminate gcc/gnu dependencies-- No-one is going to finish the work syncing up clang & Linux and then maintain that as a long-term fork. Especially when there's such interest and willingness from mainline. Unless it was a small part of a...
Are there any successful forks or refactors of the Linux Kernel?
1,592,341,065,000
this is my fish configuration: set -x CGO_CPPFLAGS 'llvm-config --cppflags' set -x CGO_LDFLAGS 'llvm-config --ldflags --libs --system-libs all' set -x CGO_CXXFLAGS '-std=c++11' I've tried running make on my LLVM-based project, but I get the following error: clang: error: unsupported option '--cppflags' clang: error: ...
Try setting the variables to the output of llvm-config using command substitutions, rather than the raw commands themselves: set -x CGO_CPPFLAGS (llvm-config --cppflags | tr -s ' ' \n) set -x CGO_LDFLAGS (llvm-config --ldflags --libs --system-libs all | tr -s ' ' \n) set -x CGO_CXXFLAGS '-std=c++11' The pipe through ...
Can't seem to set environmental variables in fish correctly?
1,592,341,065,000
Firstly, this isn't my first attempt at building an LFS system - I've already successfully built LFS 7.8 and LFS 7.8-systemd. I would like to replace GCC+GlibC with ELLCC, which is Clang/LLVM+musl. It has a few limitations - the most notable of which is that it currently lacks support for dynamic linking - but the int...
You're right - simply swapping toolchains will not magically make it work. As an experienced musl user I can say this will not work "out of the box". Many, many programs still require special cases glibc only provides which are even not in musl, and especially many GNU project programs will not even compile without gl...
Building an LFS system using ELLCC
1,592,341,065,000
I have a 64 bit FreeBSD build machine. I need to add https support in my python3 application code. For that it is advised to build/compile python with openssl support. I do not need any gcc dependency in my final executable. So instead i am using clang to build python. But before that while building openssl I am unabl...
You seem to be having a number of issues, summarised below. You almost certainly should be using a port for python as noted by @mjturner, which will use the native FreeBSD OpenSSL. in csh the syntax set CC clang sets two variables named CC and clang to the empty string, you want set CC=clang, but even that won't work...
How to build openssl with clang(rather than gcc) on a FreeBSD machine?
1,592,341,065,000
I'm considering switching to Fedora, but the latest stable Fedora (36) only ships Clang 14, while the latest release is Clang 15. Is there any way to get up-to-date binaries, without switching to the beta version of Fedora? I found https://copr.fedorainfracloud.org/coprs/g/fedora-llvm-team/llvm-snapshots/, but they on...
Just build the Fedora37 package of clang locally :) Install mock, add your user to the mock group, go to the RPM source page, i.e., https://src.fedoraproject.org/rpms/clang , click on clang-15 for F37, get the clang-15.0.0-2.fc37.src.rpm , and tell mock to build it in a container for your target architecture (assumi...
How to install the latest stable Clang on Fedora?
1,592,341,065,000
Is there a way to compile a C program with Clang compiler for MIPS (32-bit) on a FreeBSD x86_64/AMD64 system?
If FreeBSD supports some Linux cross-compiler tools(and you can port them to FreeBSD if they doesn't exists in their repositories) then probably yes. It is not FreeBSD tool but i know one tool with Linux distro that can build cross-compilers from source and switch between compiler relatively easy is crossdev from Gent...
Compiling a C program with Clang for MIPS (32-bit) on a FreeBSD x86_64/AMD64 system
1,592,341,065,000
I'm working on a RHEL7 and I just installed clang: sudo yum install clang. Then I execute the command clang-format --version and the output is below: me@localhost:~$ clang-format --version LLVM (http://llvm.org/): LLVM version 3.4.2 Optimized build. Built May 10 2018 (10:48:27). Default target: x86_64-redhat-l...
This issue can be reproduced with older versions of clang-format available for install with yum in sglim2/centos7 docker image for example. clang-format --version has been modified to return 0 in this commit: CommandLine: Exit successfully for -version and -help Tools that use the CommandLine library currently exit ...
Why does `clang-format --version` return 1
1,592,341,065,000
I try to compile a program by typing (lets assume here I'm cd'd into the directory) clang++ file_name.cpp. It compiles and should autorun, but it doesn't, and just ends the event, and opens the terminal back for input. I see a file named 'a.out' in the folder directory. And if I type clang++ file_name.cpp, nothing ha...
A compiler like clang++ only does compiling of the source code. In your case, it creates the executable file a.out (since you didn't explicitly tell it to use some other output filename using the -o option). The compiler will not automatically run the resulting executable. These things also holds true for g++ (the ...
Clang++ Compiles, but doesn't run
1,592,341,065,000
Installed clang: $~/Projects/clang$ sudo apt-get install clang Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: clang 0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded. Need to get 0 B/3,590 B of archives. After ...
You need to use clang++. clang is the C compiler, clang++ is the C++ compiler. Like gcc. I think these are basically the same compiler under the hood, but (again like gcc), clang++ links against the C++ libraries by default, while clang doesn't. Hence the linker errors.
What else is needed to use clang besides "apt-get install clang; clang hw.cpp"?
1,592,341,065,000
I'm new to NixOS and I'm trying to build a project which uses Flex. I get the following error if I try and build the project /nix/store/b10shv9yqbgps47y0n8x7l7bq8fmp1i6-binutils-2.31.1/bin/ld: cannot find -lfl How can I resolve this? `ld: cannot find -lc` on NixOS shows that I need to add glibc.static to shell.nix's b...
I solved it! In the make file, add: FLEX_PATH := $(shell dirname $(shell which flex)) LIB_PATH := $(shell readlink -f "$(FLEX_PATH)/../lib") clang ... -L $(LIB_PATH) -lfl ...
Unable to use -lfl on NixOS
1,592,341,065,000
I am trying to install UDUNITS-2 package for the graphical visual browser: ncview. I need to understand the following error message: clang: error: no such file or directory: '_REENTRANT' A similar question was given here ---> Xcode 7.2 - clang: error: no such file or directory: My ./configure output: brendan-darrer:D...
LIThe problem was solved by implementing the code: brew install -s ncview Using homebrew (extra Linux code for Mac), that installed the whole ncview package automatically for the Apple Mac, including it's dependencies. See: katbormann commented on 13 Jul 2016 on GitHub post.
clang: error: no such file or directory: '_REENTRANT'
1,381,364,159,000
What command(s) can one use to find out the current working directory (CWD) of a running process? These would be commands you could use externally from the process.
There are 3 methods that I'm aware of: pwdx $ pwdx <PID> lsof $ lsof -p <PID> | grep cwd /proc $ readlink -e /proc/<PID>/cwd Examples Say we have this process. $ pgrep nautilus 12136 Then if we use pwdx: $ pwdx 12136 12136: /home/saml Or you can use lsof: $ lsof -p 12136 | grep cwd nautilus 12136 saml cwd DIR...
Find out current working directory of a running process?
1,381,364,159,000
Say I do the following: cd /some/path ln -s /target/path symbolic_name If then do: cd /some/path cd symbolic_name pwd I get: /some/path/symblic_name and not: /target/path Is there a way to have the shell "fully resolve" a symbolic link (i.e. updating CWD, etc.), as if I had directly done: cd /target/path ? I need...
Your shell has a builtin pwd, which tries to be "smart". After you did a cd to a symlink the internal pwd fakes the output as if you moved to a real directory. Pass the -P option to pwd, i.e. run pwd -P. The -P option (for “physical”) tells pwd not to do any symbolic link tracking and display the “real” path to the di...
Resolving symbolic links (pwd)
1,381,364,159,000
We have env(1) to modify the environment of the command we want to run (for example env MANPAGER=more man dtrace). Is there something similar but for modifying the directory that the command is going to be started in? Ideally, I would like it to look like this: theMagicCommand /new/cwd myProgram This way it could be ...
AFAIK, there is no such dedicated utility in the POSIX tool chest. But it's common to invoke sh to set up an environment (cwd, limits, stdout/in/err, umask...) before running a command as you do in your sh script. But you don't have to write that script in a file, you can just inline it: sh -c 'CDPATH= cd -P -- "$1" &...
Is there a POSIX (or at least a popular) utility to set the current working directory when invoking a program?
1,381,364,159,000
I am now under a directory with very long path. For future visiting it quicker, I would like to create a link to it. I tried ln -s . ~/mylink ~/mylink actually links to ~. So can I expand ~ into the obsolute pathname, and then give it to ln?
A symlink actually stores the path you give literally, as a string¹. That means your link ~/mylink contains "." (one character). When you access the link, that path is interpreted relative to where the link is, rather than where you were when you made the link. Instead, you can store the actual path you want in the li...
Create an absolute symbolic link to the current directory
1,381,364,159,000
I feel like this should be straightforward but I've never seen anyone ask this that I can tell. The situation is pretty straight forward. Whenever I become a user, ie su user it always starts in /root directory instead of it's home directory. Let me show you. [root@st-test2 ~]# grep "postgres" /etc/passwd postgres:x:2...
If you only give a username as argument, su changes user without changing much else: For backward compatibility, su defaults to not change the current directory and to only set the environment variables HOME and SHELL (plus USER and LOGNAME if the target user is not root). So su postgres stays in the same directory....
Why do all users start in /root instead of their home directories after su as root?
1,381,364,159,000
I want to create a one way symlink i.e. I can use it to go to the destination directory but I cannot go back. Let's say there is a directory called D with two subdirectories S1 and S2. I want to create a link in S1 that points to S2 (let's say ls2 -> ../S2/). If I do cd ls2 and then cd .. then I want to go to D and no...
All symbolic links are one-way. As far as the kernel is concerned, after going into /D/S1 and running chdir("ls2"), you're in /D/S2, so if you run chdir(".."), you end up in /D. If you do this in a shell, after cd /D/S1 cd ls2 cd .. you end up in /D/S1. The reason is that the shell does its own tracking of the curren...
Can I create a one way symlink?
1,381,364,159,000
Can I change the current working directory of a certain process? For example, I am running a process that has the pid 1000. Right now, its current working directory is ~. I want to change its current working directory to ~/1. How can I do it?
You can use the following script (found here) #!/bin/bash pid="$1" # first arguvment is the PID cwd="$2" # second argument is the target working directory # now let's command the GNU debugger gdb -q <<EOF attach $pid call (int) chdir("$cwd") detach quit EOF Call it by passing the PID as the first parameter ...
Changing the current working directory of a certain process
1,381,364,159,000
What is the difference between cwd and pwd? I've tried googling it, and one of the answers mentioned that depending on some factor (which I sadly do not remember), the implementation (the code I'm assuming) is not the same? I don't suppose this is like the difference between print('x') vs return str(x) (to use a Pytho...
cwd: current working directory (a concept, state, or value) pwd: print working directory (a command) Part of the confusion may be that in some shells $PWD is actually the current working directory name, and pwd is a command to display it (similar to echo "$PWD" where available). At the library level, pwd can be impl...
What is the difference between cwd and pwd?
1,381,364,159,000
Ok this is a short question. I just happened to know that with pushd command, we can add more working directories into our list, which is handy. But is there a way to make this list permanent, so it can survive reboots or logoffs?
You may pre-populate the directory stack in your ~/.bashrc file if you wish: for dir in "$HOME/dir" /usr/src /usr/local/lib; do pushd -n "$dir" >/dev/null end or, if you want to put the directories in an array and use them from there instead: dirstack=( "$HOME/dir" /usr/src /usr/local/lib ) ...
Making 'pushd' directory stack persistent
1,381,364,159,000
In FreeBSD, man mount_nullfs states that: The primary differences between a virtual copy of the file system and a symbolic link are that the getcwd(3) functions work correctly in the virtual copy, and that other file systems may be mounted on the virtual copy without affecting the original. A diffe...
The primary differences between a virtual copy of the file system and a symbolic link are that the getcwd(3) functions work correctly in the virtual copy, getcwd’s behaviour with symlinked directories is a fairly well-known gotcha, documented in Advanced Unix Programming for example (see this SO question for a...
Meaning of statement that 'getcwd functions work correctly' in FreeBSD man page for mount_nullfs?
1,381,364,159,000
My desire is not to change directory then execute. I use a jar file and need to execute that. So I made a very basic shell script to do that. #!/bin/sh java -jar TreeForm.jar Then, I saved it as TreeForm, not TreeForm.sh. Next, I created a symbolic link as below: ln -s /opt/TreeForm/TreeForm /usr/bin/ chmod +x /opt/T...
The shell will not change to another directory unless you tell it to. If you want your script to execute commands in a different directory, call cd from your script. The path to the script is available as "$0". If the script is a symbolic link, that's the path to the symbolic link. If you want to get the final target ...
Run a shell script via a symbolic link from the directory containing the script itself
1,381,364,159,000
On one of our servers, we have a directory with the following path: "/daten/i/scripts" When you go to /daten/i, one can see that scripts is a soft link to "/batch". When I type cd /daten/i/scripts and then pwd, I see /daten/i/scripts. Is there a way, a command, that I can type in at /daten/i/scripts that shows me tha...
Yes, pwd has -P (--physical) option to avoid all symlinks. So do: pwd -P or you can use the canonical way, readlink: readlink -f /path Check man pwd and man readlink.
How can I make pwd resolve a soft link?
1,381,364,159,000
I understand what a logical working directory is. When you create a symbolic link to a directory, and then cd to that directory using the symbolic link, your logical working directory becomes the path of the symbolic link + the symbolic link itself! for example: $ pwd /home/john/this_is_a_symbolic_link But what is th...
A somewhat complicated use case: On some system, users' home directories may, for example, be mounted by an automounter (as on Solaris). From the Wikipedia "Automounter" article: The automounter has the purpose of conserving local system resources and of reducing the coupling between systems which share filesystems w...
What is the benefit of a logical working directory?
1,381,364,159,000
I tried a little experiment where I created 2 folders Dir1 and Dir2 inside my Desktop directory, such that Dir1 is parent of Dir2. /home/username/Desktop/Dir1/Dir2 Then, I use cd to set my pwd as /home/username/Desktop/Dir1/Dir2. Next I used rm -r /home/username/Desktop/Dir1 to remove the Dir1. Now if I use pwd it s...
Actually, Dir2 does exist, but the name Dir2 does not. Confused? :) The shell's current directory is still the directory referred by the name Dir2, and this keeps the directory still around. This is analogous to anonymous files. Normally, when a files link count goes to zero, the file is deleted and the inode freed. H...
Why does the pwd doesn't update after directory removal?
1,381,364,159,000
Say I have this structure /masterscript /a/script1 /a/b/script2 In masterscript I spawn the other scripts as background processes: "/a/script1" & "/a/b/script2" & The problem is that script1 and script2 inherit the working directory of masterscript. Is there a way to start these scripts with working directories the ...
(cd /a && ./script1)& (cd /a/b && ./script2)& If the names don't contain spaces or special characters like *, (, or ), you don't need quotes.
Can I start a background process with a specific working directory?
1,381,364,159,000
Suppose I write a program, which outputs a file under a relative path (as opposed to a full/absolute path) - let's say, the current path. Then I compile it and store the executable under some dir path1. Now I run the executable, while I am under a different dir path2. The executable will output a file under path2 in...
Question 1 : Why is the directory where a program is installed not the initial directory of the process when running the program? Actually, the installation path of a program is irrelevant. What matters is the current path of the father process. In case of a program launched from a shell, the father process is the she...
The current path of a process
1,381,364,159,000
Can't seem to figure out what the issue is. This is on a Fedora 37 with default setup (bash, gnome, etc...). What I want to achieve is to create an alias that creates a python virtual environment, where the folder name for the virtual environment is the name of the current working directory (something akin to python3 ...
What is wrong with $cwd? When you use cwd="pwd | rev | cut -d '/' -f1 | rev" and then $cwd you are actually running pwd with arguments (you do not pipe the output). So basically you are running something like this: pwd '|' rev '|' cut '-d' "'/'" '-f1' '|' rev You do not see any error because pwd will ignore non-optio...
Set alias to run python venv setup based on current directory name
1,381,364,159,000
I am experimenting with symbolic links and I'm encountering a couple issues. The first is how after following a symbolic link to a directory to display the actual working directory instead of the directory with respect to the symbolic link (when using pwd, for instance). The second is how to "back up" into the actua...
From man pwd on my Ubuntu: your shell may have its own version of pwd I use bash. Simple pwd command gives me a path with respect to the symbolic link; yet /bin/pwd returns the actual path. The cd command is also a bash builtin. In other words: this is shell specific. EDIT: thrig's comment (see below) seems to be a ...
How to work with symbolic links to directories
1,381,364,159,000
I'm hitting an issue where I need to get the unresolved symlink of a shell process. For example given a symlink ~/link -> ~/actual, if bash is launched with a $PWD of ~/link, I need to fetch that from outside the bash process. Getting the resolved cwd is possible using lsof or /proc as called out in https://unix.stack...
The logical value of the current working directory (logical cwd, what you call “unresolved pwd”) is an internal concept of the shell, not a concept of the kernel. The kernel only remembers the fully resolved path (physical cwd). So you won't get the information you want through generic system interfaces. You have to g...
Get the unresolved pwd of a shell from another process
1,381,364,159,000
I'm reading some doc about UNIX but I don't understand two things: Why is important for the kernel to know the current working directory of the running process? Why not keeping the inode information in the directory?
The system needs to keep track of the current directory of all processes because otherwise processes couldn't use relative paths for anything (including for example file open or stat, and changing directories — what does chdir("..") mean if you don't track were the process currently sits?). There's also the matter tha...
Kernel current working directory and inode information placement
1,381,364,159,000
By default, every Linux distributions' Terminal I have used so far starts at /home/[username]. For some reason, without noticing, the default folder is now at root in Sabayon. How do I change the default starting folder in Terminal to be my username folder again?
You can change your initial location to your home by adding cd ~/ To your ~/.bashrc You may also need to check that $HOME is set to your actual home directory export HOME=/home/user_name/
Terminal has changed its default folder to start at
1,381,364,159,000
I wanted to check the current directory opened in nautilus window. I check the pid of nautilus, and symbolic link proc/pid/cwd, always points to home directory. Is this expected behaviour? If so thenhow to check the opened directory of nautilus from command line?
Nautilus can open multiple windows from the same process, but a process has a single current directory, so Nautilus can't change its directory based on what it's displaying in its windows. I can't think of a good reason for Nautilus to change its current directory anyway. What would be the point? When Nautilus needs t...
Why cwd in /proc/nautilus_pid/cwd always points to /home/username?
1,466,217,237,000
I recently did a clean install of Linux Mint 17.3 with Cinnamon on my machine. Before the clean install, if I right clicked on a file or folder in nemo, the menu would have a 'create shortcut' option. Now after the clean install, that option isn't there. I've gone through the nemo preferences and I can't find any opti...
When you right click the file or folder in Nemo, there will be a + sign at the top. Clicking that will expand the menu and give you the options you want. For what it's worth, I found this functionality at this link: https://forums.linuxmint.com/viewtopic.php?t=212256
Right click menu in Nemo missing 'create shortcut' and 'copy/move to'
1,466,217,237,000
Objective I am looking for an easy way to consistently run a terminal that automatically opens to a specific directory. Is there a way to do that without changing the default directory? Preferably I just click on a 'shortcut' link and it opens that customized terminal to that directory or maybe runs the CD command for...
Most terminal programs like xterm, urxvt, gnome-terminal have an option to change the starting working directory of the shell. If you are using gnome-terminal, there is a special command line switch you have to provide to start the shell in a user defined directory. The command line switch I'm talking about is --worki...
How to make a Desktop "shortcut" that opens the terminal but under a different directory than the default home?
1,466,217,237,000
After installing PyCharm on Pop! OS (by extracting the download) there is no easy way to run the program. I have probably installed it in my Documents folder. Not sure what the convention is. To run PyCharm I need to go to the folder pycharm-community-2019.2.4/bin, open terminal and run ./pycharm.sh Any way to make m...
You can use main menu. There is Tools -> Create Desktop Entry. It might require root permissions.
PyCharm has no shortcut or launcher
1,466,217,237,000
I am using Debian and I want to make a icon on the launcher that I can click on to open my Teamspeak server. Currently, I have to go to the terminal and type the following commands. cd /usr/bin/teamspeak3-server_linux-amd64 ./ts3server_minimal_runscript.sh This launches my Teamspeak 3 server, leaving the terminal ope...
Create a desktop file for Teamspeak 3 server and place it at /usr/share/applications directory and run sudo update-desktop-database. how to create the desktop file open any text editor of your choice and place the lines bellow and save it with any name you want like teamspeak_3_server.desktop . [Desktop Entry] Type=A...
Create Launcher Shortcut
1,466,217,237,000
I noted it is possible set a number of hotkeys in Linux Mint 17.1 using the keyboard application, but there's not possibility to set the hotkey "Show All Windows"; you can only set a button using Preferences -> Hot Corners. You can set customize hotkey too, but I'm not able to do that. Browsing on the internet, I did ...
I think its name is "Toggle Scale" on the keyboard shortcuts settings.
What is hotkey in Linux Mint for "Show All Windows"?
1,466,217,237,000
When I try and open the gnome terminal, by clicking the 'terminal' icon in apps, I get a loading and then nothing happens. Is there some way of seeing the background output of trying to open it to try an ddebug it? UPDATE 1: So I was able to open xterminal and tried starting the gnome terminal like this: gnome-termina...
As Ipor Sircer suggests, if you can open another terminal, you can run gnome-terminal from there. Alternatively, you can dump gnome-terminal's output to a file: assuming you're running GNOME, press AltF2 and enter sh -c "gnome-terminal > ~/gnome-terminal.log 2>&1" Then you'll find all the output in ~/gnome-terminal.l...
Gnome Terminal not opening
1,466,217,237,000
I'm using GNOME 3.28.0 (in Arch Linux). I do also use two languages, so I constantly switch back and forth between those. I'm trying to configure the shortcut(s) to switch between sources – inside Settings > Devices > Keyboard, but so far, I'm unable to use the ones that I would like: Alt + Shift – and if possible, di...
I figured this one out. I was trying different shortcut combinations by changing this "key" org.gnome.desktop.wm.keybindings switch-input-source – inside dconf Editor. The correct combination value in order to use (the left) Alt + Shift was: ['<Alt>Shift_L'].
Configure switch between sources in GNOME