Questions tagged [source]
Everything that includes the source code of Unix programs for example compiling, installing or how to retrieve the code for studying.
347
questions
4
votes
4
answers
2k
views
If I have two versions of python3 installed on my machine (ie: 3.11.2 and 3.12), how do I set the default version to use when running python scripts?
I installed the earlier version (3.11.2) normally using apt package manager and the later version (3.12) manually from source. When I execute python scripts like so:
./python_script.py
The script ...
1
vote
1
answer
50
views
How to list packages that have been installed from source in Linux?
I usually use package managers like apt to install packages and then use dpkg to list the packages, that I have installed. Is there any way to get a similar list if I install from source? I saw an ...
1
vote
1
answer
28
views
Changing yum source through Gnome GUI
This might be a silly question, but it puzzles me. I am using Rocky linux version 9.2. I wonder if there is a way to change the yum install source through gnome gui? that is, without using command ...
0
votes
0
answers
64
views
source command not loading all variables
I have file containing 1100 variables. Example,
LOGPATH=/some/path
VARIABLE2=someVALUE
while running source /path/to/file.properties
Only the first set number of variables are being loaded. Is there ...
0
votes
0
answers
28
views
Installing sile from source fails
I am trying to install sile. A Debian package is not provided yet so I decided to build from source. Manual
Install Lua
$ curl -R -O http://www.lua.org/ftp/lua-5.4.6.tar.gz
$ tar -xf lua-5.4.6.tar....
0
votes
1
answer
45
views
Why the struct lsm_id is not present in linux kernel source tree
I am writing an LSM, and I am compiling it using my kernel 6.2.0-20-generic. When I browse the files in /lib/modules/6.2.0-20-generic/build, I can see that there is a struct named lsm_id. But When I ...
0
votes
1
answer
48
views
Is there a way to compile KNOPPIX from source?
Instead of downloading the ISO, is there a way to download all the source packages and compile it locally?
I came across the following URL https://knopper.net/knoppix-sources/ and would like to know ...
0
votes
2
answers
86
views
Commands cannot be located after sourcing a bash script
I have a short bash script cdline that takes two arguments PATHS and LINE and changes directory to the respective LINE in PATHS:
#!/bin/bash
#command for changing directory to that in the given line......
0
votes
1
answer
88
views
adding a Debian repository: what are the pros and cons?
Looking for software, including less free, proprietary style e.g. visual studio code, github-cli, spotify:
What are the downsides and upsides of adding or configuring a Debian repository?
Debian wiki ...
1
vote
0
answers
34
views
minimal instalation for X11R7.7
For the source code available here: https://www.x.org/releases/X11R7.7-RC1/src/, what are the minimal set I should install to get a working enviroment and be able to start it with the command startx?
0
votes
0
answers
33
views
order and dependencies for instalation of kde packages from the source
Is there any page where I could find the order for the instalation from the source for the packages listed here: https://download.kde.org/stable/plasma/5.27.4/, with the dependencies for each one of ...
0
votes
1
answer
48
views
Decanting code in $HOME/.bashrc into a function
I have the following code fragment in my $HOME/.bashrc file:
export RED='\e[0;31m'
export GREEN='\e[0;32m'
export YELLOW='\e[0;33m'
export BLUE='\e[0;34m'
export MAGENTA='\e[0;35m'
export CYAN='\e[0;...
0
votes
1
answer
30
views
Is it possible to process-redirect to source?
I want to watch (and wait) for the processes spawned by a command, I found this answer which seems pretty much exactly what I need. Except that I want the script to be self-contained, so instead of ...
0
votes
0
answers
883
views
"sudo apt update" gives erros and Ign: on my Debian. "The repository ... does not have a Release file". ubuntu.com found in update paths
Something happened 2 my Debian release and I don't know how that happened.
I was not editing /etc/apt/sources.list .
I run Vultr VPS.
My problem looks like this:
my_login@debian:~$ sudo apt update
Hit:...
2
votes
1
answer
142
views
Load variables with source with a single line scope
In bash and other shells, I can make same variables have "line scope" by defining it just before a command.
CXX=clang++ ./script.bash
Which I prefer over
export CXX=clang++
./script.bash
...
0
votes
1
answer
344
views
Are there any differences between bullseye and stable?
I was looking at directories in https://deb.debian.org/debian/dists/. By comparing timestamps I could easily tell that bullseye and stable are the same thing. So is there no difference in behavior ...
0
votes
1
answer
208
views
change the kernel version OS [closed]
It is possible to modify the linux kernel,
I have tried to search but I can't find anything related in the source code
I want to modify this line GNU/Linux
I have noticed that there are kernels with ...
1
vote
1
answer
70
views
Use shell script function directly on bash
I have a utilitarian shell script full of goodies and wish to bring them to the bash environment. I used the command source before as analogous to import or include in other languages.
printer.sh
#!/...
1
vote
1
answer
338
views
How would a Linux driver call UEFI firmware presented functionality?
For work I'm learning more about computer architecture and I just finished learning about ACPI. From talking to some other engineers my understanding for something like NVMe is that the OEM is going ...
0
votes
1
answer
301
views
Good practices when installing from sources on Linux
I'm wondering what are good practices about compilation and manual installation of software on Linux systems.
I mean getting, building and installing code by this usual way :
git clone https://a-repo/...
2
votes
2
answers
831
views
Open new terminal with environment specified by source command
I want to run a command that opens a terminal and sources into it a set of variables.
How can I do this? I'm using xfce4-terminal. It has a command-line arg "--command", to execute commands ...
0
votes
1
answer
61
views
Using cscope when making Linux kernel and cscope.files difference between "allnoconfig" and "defconfig" seems incorrect?
There seems to be very little difference between "allnoconfig" and "defconfig" when using diff to view the separate cscope.files for each build. Is this correct? Both files come ...
0
votes
1
answer
36
views
Differences between using source and ./ a .sh file
I know the above topic has been discussed before
source a .sh file and you retain the environmental variables after you are done with the sh file
while ./ a .sh file and you lose the environmental ...
15
votes
5
answers
5k
views
Why are there pre-compiled packages in repositories?
I love (the way) how Linux & Co. lets users install many packages from different repositories.
AFAIK, they come also with source-packages, so you can compile them by yourself.
But why even bother ...
0
votes
0
answers
23
views
How to patch source code tree from within the dir to be modified?
A source code tree contains a modified dnsmasq-2.80test4 source (and git files).
Now I'd like to apply the newest 2.86 dnsmasq source code to that modified 2.80test4 using diff and patch, while ...
0
votes
0
answers
92
views
Can I repost samsung kernel sources on my repo?
Samsung sources for Android are available at https://opensource.samsung.com but it's painful to download programatically. I believe that I'm free to do whatever I want with their kernel code including ...
10
votes
2
answers
1k
views
Source of passwd error messages
I am testing if the passwd command could run if the setuid bit is disabled. I disabled the setuid by running the following command:
chmod 0554 /bin/passwd
After doing so, I tested if the passwd ...
6
votes
2
answers
1k
views
How to source some shell code not a file?
There is a description of a source command:
source is a bash shell built-in command that executes the content of the file passed as argument, in the current shell. It has a synonym in . (period).
For ...
3
votes
1
answer
542
views
Cannot source file using find, fzf, and xargs
I am trying to use fzf to select and activate different virtual environments. However, I am receiving the follow error:
xargs: source: No such file or directory
My command comprises three parts: find |...
1
vote
3
answers
3k
views
How to view source code to built in linux commands? [duplicate]
To my knowledge, when I run a command like ping or grep or ls, the Linux OS will search for these command names in the directory /bin; I also know most Linux commands are written in C.
I just wanted ...
1
vote
1
answer
33
views
How to verify that source code does / does not provide driver for Apple USB modem?
Source Code: https://unix.stackexchange.com/a/698474/182280
The goal is to verify that the source code has the driver to support an Apple USB Faxmodem MA034Z/A. What are the keywords or phrases to ...
4
votes
4
answers
716
views
Is it possible for a shell to (automatically) source files after the first prompt is shown?
I'm wondering if there is any way to put something in my startup files that will cause other files to be sourced after the first prompt is shown.
I would prefer a method that doesn't rely on hooks ...
0
votes
2
answers
75
views
Installing a linux software package from source
is it possible to install a package from source? For example whether debian or opensuse, would it be possible to install an existing package say nginx from source?
The reason is that i want to try ...
0
votes
1
answer
1k
views
How do I get a sourced file in zshrc to run in bash?
I have a bash script that includes a bunch of functions. I'd like this script to run using bash. The script has this at the top:
echo "BASH_VERSION""$BASH_VERSION"
echo "...
1
vote
1
answer
16k
views
Debian: The repository CDROM does not have a Release file
I have just finished installing Debian on my laptop; I had to add manually the drivers for my WiFi card after the installation, I simply installed them via sudo apt ./name.deb, where name.deb is a ....
2
votes
1
answer
318
views
Running "sudo -s" as a user with sudo priv, does not source .bashrc
I want to be able to run sudo -s as a user with sudo priv, and have /root/.bashrc be sourced.
I checked the .bashrc file and the .profile file for /root, both look fine.
Every time I try to use sudo -...
0
votes
1
answer
154
views
Calling a function from terminal without export from sources file [duplicate]
Have added a number of functions which I source from my .bashrc. For instance, I use
export -f calc
I also have another function usage_calc where I comment out the export call
# export -f usage_calc
...
3
votes
2
answers
2k
views
How can I get glibc/libstdc++ sources and set them up for gdb to find?
I'm debugging this program which raises an exception. This makes my debugger look for some source code, e.g. ../sysdeps/unix/sysv/linux/raise.c - and fail to find it.
Now, I realize it's not necessary ...
-2
votes
1
answer
312
views
How do I install NodeJS on GuixSD?
How do I install NodeJS on GuixSD?
0
votes
4
answers
37
views
How can I have locally installed software be automatically sourced when I log into my account?
I have built and installed a new piece of software manually (from a remote git repository). Every time I want to use it, I run something like,
. /path/to/setup_software.sh
but I would like that to ...
-1
votes
1
answer
64
views
Sourcing bash scripts in cascade [closed]
I have a number of scripts that are sourced in cascade. Am new to this and would not mind having some examples, with some details of pros and cons?
-1
votes
1
answer
72
views
I can't recompile im-chooser in Fedora 34
I have a problem in my Fedora 34 with one package which i can't recompile using rpmbuild --rebuild from Fedora 22 to 34, cause it gave me an error which I can't repair.
eggsmclient-dbus-gnome.c: In ...
0
votes
1
answer
125
views
I can’t recompile exo in Fedora 34
I have a problem with my Fedora 34.
I was trying to recompile xfce 4.12 on Fedora 34 using rpmbuild —rebuild from version 22 to 34, I recompiled some packages but one gave me an error which I can't ...
1
vote
0
answers
867
views
Where are the definitions for dead key combinations?
I noticed that on Ubuntu 20.04, some dead key combinations act differently than expected. For instance, dead acute followed by c produces ç, not ć as one might expect.
I have found the keyboard layout ...
0
votes
1
answer
149
views
List installed dependencies after building software from source
When wanting to completely remove a built-from-source program: is there any way one could see which packages were installed as dependencies and easily remove them?
Note that I mean the packages that ...
0
votes
1
answer
519
views
Does using checkinstall instead of make install allow to easily remove dependencies?
I'm very new to Linux, so please excuse any normie errors/misconceptions. I want to learn how to build programs from source, but I'm having a hard time understanding how dependencies are managed when ...
-1
votes
1
answer
47
views
What makes the occurrence of the word "redhat" in the Linux sourcecode fluctuate so much
I was browsing this website: https://www.vidarholen.net/contents/wordcount/#redhat,oracle,google,apple,microsoft
What I noticed was that at a few points in times the usage of the word "redhat&...
-1
votes
1
answer
64
views
Is there a convention for naming and placing the manual page file for a command in source tree?
I think the name could be in format
<command_name>.<section_number>
where the numbers are shown in the description chapter of man man.
I use doc directory for the file in a repository.
0
votes
1
answer
2k
views
How to get source code of a package in ubuntu for a specific version
For example,
sudo apt-get source bash
downloads the source code for the latest bash package version (5.0). How do I get the source code for an older version of the package (e.g. 4.3).
Is there some ...
1
vote
1
answer
1k
views
How can I 'upgrade' python without internet access?
I installed Python 3.7 on RHEL by downloading .tgz file from python.org and
using a chain of commands './configure -> make -> make install'
Now I need to upgrade it to Python 3.9.
What should I ...