Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am trying to use VirtualBox to set up a multi-host software testing environment. I need to share code and data between the VM and host computer (Ubuntu Linux in both cases). Using the "Shared Folders" menu item from VirtualBox does not seem to enable folder sharing as desired.
How do I properly configure shared folders between the host and the VM?
Open your VM And go to the top menu Device and click on Insert Guest Additions CD
Now go to the VM setting and follow the settings
Folder path, you locate your share folder. After that give a Folder name
Now again go to in your VM terminal
and type the following command
$ sudo /media//VBox_GAs6.0.12/VBoxLinuxAdditions.run
$ mkdir /home//shared
$ sudo mount -t vboxsf ubuntushare /home//shared
If you have not already done so, make sure the VirtualBox Guest Additions are already installed (top
menu -> Devices -> Insert Guest Additions CD, then follow the prompts)
On the host, go to VirtualBox window:
top menu -> Devices -> Shared Folders -> Shared Folder Settings
Click "+" icon on right:
Under "Folder Path" navigate to an absolute pathname on the host like "/home/joe/myFolder"
Under "Folder Name" enter a unique ID like "someName"
On guest VM, open a terminal and type:
> sudo mkdir -p /mystuff
> sudo mount -t vboxsf someName /mystuff
The trick is that the ID string "someName" is just a tag to connect the host directory and the VM
directory. It has not other purpose. The shared folder /home/joe/myFolder is now available as the dir /mystuff in the VM. Note
that the directory name in the VM doesn't have to match the original directory name on the host, although we could make them similar if we wanted (e.g. /myfolder or /joe/myFolder in the VM).
The VirtualBox GUI does not make a clear distinction between the directory name on the host, the directory
name on the VM, and the ID string that connects them.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
So I wanted to copy a folder from a remote server to my local computer. I am using WSL (Windows Subsystem for Linux)/ Ubuntu.
First, I ssh into the server using ssh user#host.
Then I wrote the scp command which is scp -r user#host:/var/www backup-9-feb
But now I cant find this backup-9-feb folder, please help. Unfortunately, I forgot the name of the folder too. This is just an example.
After I executed these commands, A long list of files with there paths were shown
You don't need to ssh into the server to use scp. You want to do the following on your computer: scp -r server_user#server_host:/var/www backup-9-feb. This will copy (recursively) the directory /var/www of the server to the directory where you ran this command on your machine.
Note: scp is going to be deprecated so you probably want to start using an utility like rsync (works similarly).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm using Ubuntu 18.04 as Windows Subsystem for Linux on my Windows 10 machine.
I've installed gedit without any errors or warnings.
But whenever I try to use the command gedit something (here something is a filename)
I get this error:
Unable to init server: Could not connect: Connection refused
(gedit:48): Gtk-WARNING **: 21:03:26.729: cannot open display:
You need an X server to run graphical applications like gedit.
I use VcXsrv or Xming on my Windows desktops, both are very small and easy to install,
but there exist other servers like Cygwin/X.
Short instructions for VcXsrv/Xming:
download and install the Windows package
start XLaunch or Xming
export the DISPLAY variable in your WSL terminal and start gedit
export DISPLAY=0:0
gedit
I have the problem that some checkboxes in gedit's preferences are not working (dconf error, I don't care), but other than that the editor is usable.
Related:
What's the easiest way to run GUI apps on Windows Subsystem for Linux as of 2018? (askubuntu.com)
To fix this problem
Step 1- Download and Install this Windows X Server https://sourceforge.net/projects/vcxsrv/
Step 2- Open XLaunch
Step 3- Select " Full screen " option
Step 4- Choose " Start no client " option
Step 5- Simply do next and finish
Step 6- Open terminal and type :
export DISPLAY=0:0
gedit filename
In case your Linux machine is available with host name = 'hostname' and you'd want to ssh into the hostname and then open gedit then execute the following commands:
Enable X11Forwarding in the ssh server
[hostname] $ vim /etc/ssh/sshd_config
# and set X11Forwarding to yes
X11Forwarding yes
Set the DISPLAY env in the client terminal and then ssl with -X flag
export DISPLAY=0:0
ssh -X yourusername#hostname
[hostname] $ gedit filename
It's probably because you are running it with root user.
Run it as non-root user.
(If you don't know that if you are running it as root or not, enter the command below and if it returns 0, it means you are root and you must to login to non-root user: id -u)
(If you had run sudo su or something like that, It means you are root and you must use exit to go back!)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
After a typo in a change to /etc/pam.d/sudo no user can sudo at all. The package cannot be modified as it requires sudo privileges, but all attempts result in rm: cannot remove ‘/etc/pam.d/sudo’: Permission denied and attemps to escalate to sudo result in sudo: PAM authentication error: Module is unknown. The package cannot be removed as it requires sudo. What is there to be done?
My account was part of the sudoers group, was able to pkexec vi /etc/pam.d/sudo and make the appropriate changes to the file as described here
In this situation where root access is required you have 2 options: (1) acquire the root password and fix pam.d/sudo or (2) boot with the install media with init=/bin/bash (or linux init=/bin/bash using LILO).
If you can't get the root password and must rely on the install media, then you will need to boot the install media, at the grub or lilo menu choose Boot Options and set:
init=/bin/bash (if you are using GRUB Boot loader)
linux init=/bin/bash (if you are using LILO Boot Loader)
Then check that the / filesystem is mounted read/write with the mount command. If not rw, then:
mount -o remount,rw /
You can then modify/replace pam.d/sudo. Reboot or telinit. (Note: you will need to modify the commands for systemd)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am playing around with an open-source software, FSL. I have no problems running it on my Mac, where I am able to simply start it by typing fsl in the terminal.
However, I have no idea how to start the software on our school's HPC server. After logging into the school server via SSH, I type fsl as usual, and then
If 'fsl' is not a typo you can run the following command to lookup the package that contains the binary:
command-not-found fsl
-bash: fsl: command not found
Then, I navigate into the FSL installation directory (/data/apps/arch/Linux_x86_64/fsl/5.0.6) and type fsl. Still the same error. I have also tried
module load /data/apps/arch/Linux_x86_64/fsl/5.0.6
But this error occurs.
utility.c(2360):ERROR:50: Cannot open file '' for 'reading'
utility.c(2360):ERROR:50: Cannot open file '' for 'reading'
...
How should I load it properly and ultimately run it?
You have to call the executable with the correct path. You may either
cd to the directory containing the executable
prefix the executable's name with the path ./fsl
or (if you intend to use the executable frequently):
add the executable's path to your PATH-environment variable (export PATH=$PATH:/path/to/the/folder/containing/the/executable)
use the executable's name to call it (fsl).
or you place a symlink to your executable somewhere the $PATH already points to:
Check $PATH with echo ${PATH} (outputs a colon-separated list of directories the command line processor will look for your call)
If there is ~/bin in there, place a symlink: ln -s /path/to/your/executable/fsl ~/bin/fsl.
The command line processor will search the directories listed in ${PATH} for an executable called somecommand if you type somecommand.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I recently changed the permissions around for the /var/www/ directory on my Ubuntu 12.04 machine. Now my user can save to the directory but I get an error whenever I try to run the sudo command stating that my user is not in the sudoers file. I booted up grub to take a look and have tried to run "sudo usermod -G sudo kevin" a few times and get the error cannot lock /etc/passwd/; try again later. Is there any way to re add myself to that group without re-installing Ubuntu?
It sounds like your problem stems from the file system being mounted read-only as it is by default in recovery mode. Try remounting the filesystem in read-write mode using
"mount -o remount,rw /"
Are you sure your system is mounted in read/write mode when you're using GRUB? This can be achieved through the mount -o remount,rw / command.