How do I take a screenshot on a Raspberry Pi running Debian Squeeze and LXDE? [closed] - debian-based

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Noob question...
But shutter not installed, print screen doesn't appear to work, screen grab not installed etc.

This can be achieved with ImageMagick. Install by running the command
sudo apt-get install imagemagick
To grab all desktop just type
import -window root screen.png
Or you can do it with a delay of 5 seconds
sleep 5; import -window root screen.png

For a lighter weight screenshot tool, use scrot
sudo apt-get install scrot
To take a screenshot, at the terminal, just type
scrot
To take a screenshot after, say, 5 seconds
scrot -d 5

Related

Unable to download SQL Server on M1 Mac [closed]

Closed. This question is not about programming or software development. 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 11 days ago.
Improve this question
I have been trying to download SQL Server on my Mac with an Apple Chip. I've been following the steps that include downloading docker and entering code into my terminal to set up the images and containers within docker. However, when I try and type in this code:
docker run --name SQLServer -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=12345OHdf%e' -e 'MSSQL_PID=Express’ -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
I get the following response in terminal:
WARNING: The requested image's platform (linux/amd64) does not match
the detected host platform (linux/arm64/v8) and no specific platform
was requested
a1c6173553fc3ae53d28cc4c8bef452fdd322bf1ab2074124803c2275a97e587
I was wondering if anybody would be able to help me in fixing this problem
Using the azure sql edge docker image and installing mssql tool separately worked for us.
This is the Dockerfile
FROM mcr.microsoft.com/azure-sql-edge:latest
EXPOSE 1433
COPY ./database/schema.sql /database/schema.sql
ENV SA_PASSWORD "MyP#w0rd"
ENV SQLCMDPASSWORD "MyP#w0rd"
ENV ACCEPT_EULA "Y"
RUN (mkdir -p /opt/mssql-tools/bin && cd /opt/mssql-tools/bin && wget https://github.com/microsoft/go-sqlcmd/releases/download/v0.8.0/sqlcmd-v0.8.0-linux-arm64.tar.bz2 \
&& bzip2 -d sqlcmd-v0.8.0-linux-arm64.tar.bz2 && tar -xvf sqlcmd-v0.8.0-linux-arm64.tar && chmod 755 sqlcmd)
RUN /opt/mssql/bin/sqlservr & sleep 20 && \
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -d master \
-Q "create database testdb;" && \
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -d master -i /database/schema.sql
CMD /opt/mssql/bin/sqlservr
From the docker docs:
"Not all images are available for ARM64 architecture. You can add
--platform linux/amd64 to run an Intel image under emulation. In particular, the mysql image is not available for ARM64. You can work
around this issue by using a mariadb image."
A bit late to the party but here's a workaround for this using an open source tool called Lima and Rosetta as the VM: https://dev.to/srburnham/forget-azure-sql-edge-on-a-m1-mac-run-full-blown-sql-server-linux-instead-a-how-to-6d2. Saves you from having to resort to the cutdown edge version.
I have followed the tutorial on the website but I can't connect azure data studio to the SQL Server instance ... while he is running
#Aaron Bertrand
I finally use Azure Sql Database instead of SSMS

/usr/bin/env: ‘python’: Permission denied---Problem while installing Ninja [duplicate]

This question already has answers here:
Python or Python3. What is the difference?
(2 answers)
Closed 1 year ago.
I am install Ninja on Ubuntu (which is running based on windows).
I'm following the following steps:
apt-get install re2c
git clone https://github.com/ninja-build/ninja.git
cd ninja
./configure.py --bootstrap
cp ./ninja /usr/bin
But there is a problem after type the command at ./configure.py --bootstrap that I cannot solve:
/usr/bin/env: ‘python’: Permission denied
I am in root user, and the python 3 is installed.
The permission list:
ls -ld configure.py # see the permission
-rwxrwxrwx 1 # the listed permission
Has anyone seen this problem?
The problem was solved according to #tripleee comment (thanks). Use python3 configure.py --bootstrap instead of using ./configure.py --bootstrap , then it works.

Execute a runnable .jar file from cmd without java -jar [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I want to execute a .jar file from command line using just the .jar file name.
For e.g.
Instead of
java -jar <jarname>.jar -a <a> -b <b>
I want to run
<jarname> -a <a> -b <b>
Is it possible. If possible how? I don't want to use batch script, since I am using apache commons cli for command line arguments parsing.
You can't do that.
What you can do, is write a shell script that does the command you don't want to do, or generate a executable wrapper. In both cases, the solution is OS-dependent. On windows, there is launch4j, on MacOS, you can create an app (that is a folder with a particular structure).
UPDATE
Actually, creating an app on MacOS is not a solution for using in a command line.
Is it possible.
No. It is not possible.
(Well ... if your shell supports a aliases or shell functions, then the user could write one. For example alias foo='java -jar foo.jar' But that's not really the same.)
For something like this, I would recommend writing a wrapper script. If you are using a platform with a POSIX compliant shell (sh, bash, etc) then it is not difficult to avoid mangling the command line arguments; e.g.
#!/bin/sh
java -jar /path/to/foo.jar "$#"
or
#!/bin/sh
java -cp /path/to/foo.jar com.acme.frobnicator.Main "$#"
For the record, "mvn" (which you cited as an example) is implemented as a shell script / batch file.
This seems to me like XY problem, that's why I'm trying to answer bit differently to what you asked...
Let say you have myjar.sh script, which will "convert"
myjar.sh -a <a> -b <b>
to
java -jar abc.jar -a <a> -b <b>
(this is doable, you can see it is Stephen Cs answer)
You just have a fear, that it will break your command line arguments parsing. The only possible way is to test and if you find it is not working we can deal with that...

Search files and delete them via SSH [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would like to know which SSH command should I run to search for any file named error.log inside the whole server and delete them.
Any file named error.log must be deleted.
From http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/
find . -name "error.log" -exec rm -rf {} \;
And also XARGS example from http://www.askdavetaylor.com/how_do_i_delete_all_occurances_of_a_file_in_linux.html
find . -name "error.log" | xargs rm

Can't start Homebrew PostgreSQL install on Mac OS X - "Permission Denied" [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a Postgresql installed via Homebrew and after a crash I can not start server anymore..
if I do
$ pg_ctl start
I get
pg_ctl: no database directory specified and environment variable PGDATA unset
If I do
$ pg_ctl -D /Library/PostgreSQL/data start
I get
pg_ctl: could not open PID file "/Library/PostgreSQL/data/postmaster.pid": Permission denied
Everything was working just fine and then.. out of the blue, this.
The data folder above has permissions set at "Everything" for postgres user and "None" for everyone..
Path looks fine (in my ~/.bash_profile)
export PATH=/usr/local/bin:$PATH
When you first started Pg, did you let homebrew start it for you, or did you manually start it with pg_ctl ? I ask because I'm guessing you probably need to start and stop Pg using homebrew scripts and/or using launchd rather than directly via pg_ctl. I don't use homebrew (or Mac OS X much) but a quick search suggests that homebrew installs of Pg are usually started and stopped via launchd and ~/Library/LaunchAgents/org.postgresql.postgres.plist .
If you want to manage it manually:
What user does homebrew usually run PostgreSQL as? If you're launching Pg via pg_ctl you need to run it as the right user. From vague memory of other discussion I've seen about homebrew here, it's probably a user named postgres or postgres_ . Double-check using:
ls -ld /Library/PostgreSQL/data
and see what the owning user is, then run:
sudo -u postgres_ pg_ctl -D /Library/PostgreSQL/data start
... replacing "postgres_" with the owner of the datadir.
I suspect the reason you're getting permissions errors is that you probably didn't recursively apply the changes. Please don't; run Pg as the correct user instead.

Resources