How do I open a terminal? [duplicate]


As requested, a small C program that bi-directional pipe between two newly created pseudo-terminals. No, that doesn't answer the question, but it can be easily adapted to do so. It's not very long, so here's the code. Licence is "do whatever you want with it".

/* ptycat (ptypipe? ptypair?) * * create a pair of pseudo-terminal slaves connected to each other * * Link with -lutil * * Alternative: socat PTY,link=COM8 PTY,link=COM9 * */ #include #include #include #include #include #include #include #undef max #define max(x,y) ((x) > (y) ? (x) : (y)) /* (void)ioctl(STDIN_FILENO, TIOCGWINSZ, &win); */ /* TODO: make symlinks, unlink on atexit */ static uint8_t buf[BUFSIZ]; /* BUFSIZ from stdio.h, at least 256 */ static char *log_dir = NULL; void logdata (char *dir, uint8_t *data, int n) { if (dir != log_dir) fprintf (stdout, "\n%s", dir); log_dir = dir; for (; n > 0; n--, data++) fprintf (stdout, " %02x", *data); fflush (stdout); } int main (int argc, char* argv[]) { char...
0 0

Chosen Solution

Other posters are having a difficult time distinguishing tabs and windows, it seems. With many posters here the two terms are used incorrectly and interchangeably, just as are desktop and Firefox window, but my understanding is that a lot of that "mis-terminology" is being taught in schools.

Here is the only thing that I could find quickly for you:

Notice on the first link (read carefully). May not work, unless that should be "current tabs addresses" and it appears it may "take over" the New Window/New Tabs selections (i.e., not blank new windows/tab):

Clones the current tab's address and history into a new window when the New Window command is used (and optionally into a new tab when the New Tab command is used). {emphasis added}

If this reply solves your problem, please click "Solved It" next to this reply when signed-in to the forum.

Not related to your question, but...

You need to update some...

0 0

From the bash man page

FILES /bin/bash The bash executable /etc/profile The systemwide initialization file, executed for login shells /etc/bash.bashrc The systemwide per-interactive-shell startup file /etc/bash.bash.logout The systemwide login shell cleanup file, executed when a login shell exits ~/.bash_profile The personal initialization file, executed for login shells ~/.bashrc The individual per-interactive-shell startup file ~/.bash_logout The individual login shell cleanup file, executed when a login shell exits ~/.inputrc Individual readline initialization file

You will want to check the systemwide files and see if they are referencing rvm. If you are the only user on your system (it is your workstation or your home computer), feel free to modify these files to remove the rvm reference (assuming you aren't using rvm anymore). Otherwise, ask your system administrator to fix the execution...

0 0

Finding duplicate files on your Mac is like finding a needle in a haystack: takes either superhuman patience, or a metal detector duplicate finder app. In this post, we’ll go over both manual and app-powered ways to remove all the useless copies that waste your disk space.

So, here’s how you can find and delete duplicate files on Mac:

Hand-pick the copies using Finder Find them with a Terminal command Use a duplicate file finder app.

There’s a chance you don’t feel like digging through all your folders or messing with the command line in pursuit of duplicates. If that’s the case, skip the first two options and get yourself an app. We recommend Gemini 2: The Duplicate File Finder — it lets you scan your whole disk, review the duplicates, and delete them with a click of a button. Or, if you’re ready to get your hands dirty, there are still the manual options, and we’ll take a closer look at them now.

How to find duplicate files using Finder.

0 0

If you're like me, you'll notice that things start to get messy on your Mac after a while if you aren't super organised. The desktop gets full of files, and your folders can easily get into a bad state; but what really tells me I need to sort things out is when my right click option for Open With gets crammed with all sorts of useless junk.

In this tutorial I'll show you a very easy way to stop your Open With list showing duplicates and apps you no longer have.

The Problem

If you tend to install and uninstall apps fairly often, like I do, you can get left with an option to Open With apps you haven't even got on your Mac anymore, or even more frustrating, multiple entries of the same app. This problem can also arise if you use virtual machines like Parallels or WMWare that can leave behind data from uninstalled apps. Does this look familiar?

The problem here is that the Launch Services database is full of unwanted apps, and I want to rebuild it. So...

0 0


This question already has an answer here:

When I open my Firefox Web Browser from the terminal I get these following warnings.

william@william-AO722:~$ firefox (process:5672): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed (firefox:5672): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised (firefox:5672): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised (firefox:5672): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised (firefox:5672): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised

Is there a way that I can get rid of these warnings?

Also can anyone tell me what GLib is and what is it for?

I am running Ubuntu 13.10



0 0

Consider running Vim and a shell together in GNU Screen. The Vim wiki has info on integrating Vim and Screen. Screen supports splitting into "windows" similar to Vim's. See here for an example of even tighter Vim+Screen integration.

Having a Vim buffer tied directly to an external interactive commandline app is a feature that many have wanted for a long time, but apparently it's a bit difficult to do, due to how Vim is implemented, and the Vim devs are reluctant to change this (for arguably good reasons).

But there have been a few success stories. The Lisp community in particular has tried to reproduce Emacs' SLIME (an interactive Lisp prompt) in Vim. See VimClojure and Limp for examples. One of those could probably be altered to run a shell, but it'd take some...

0 0

To start the Duplicate File tool, open CCleaner and go to Tools, and then select the Duplicate Finder. This presents a list of options, allowing you to match files by:

Name Size Date Modified Content

We recommend you have all of these options checked, so that the file matching will be more accurate. You can select which files to ignore using the checkboxes in the ‘Ignore’ section of the page.

You can then specify extra drives and/or folders to include or exclude using the Include and Exclude tabs. To start the finder, click 'Search'.

You can delete files by ticking the checkbox and selecting 'Delete'. Please note it is not safe to remove all the duplicates CCleaner finds.

Which duplicates should I delete?

The Duplicate Finder can search for files with the same File Name, Size, Modified Date and Content; however it isn’t able to determine which files are needed and which can be safely deleted.

For this reason, we recommend that you review...

0 0

Q. I need to sort data from a log file but there are too many duplicate lines. How do I remove all duplicate lines from a text file under GNU/Linux?

A.. You need to use shell pipes along with following two utilities:

a] sort command – sort lines of text files

b] uniq command – report or omit repeated lines

Removing Duplicate Lines With Sort, Uniq and Shell Pipes

Use the following syntax:
sort {file-name} | uniq -u
sort file.log | uniq -u
Here is a sample test file called garbage.txt:

this is a test food that are killing you wings of fire we hope that the labor spent in creating this software this is a test unix ips as well as enjoy our blog

Type the following command to get rid of all duplicate lines:
$ sort garbage.txt | uniq -u
Sample output:

food that are killing you unix ips as well as enjoy our blog we hope that the labor spent in creating this software wings of fire


-u : check for strict...
0 0

Hi "gilloz",

Since it seems to be only a couple duplicate files, just use your file manager to browse to those duplicate files , and right click, select "delete". If need be, right click them, select root actions, then select "delete", enter in your password, and that should work.

In the Software Manager or Synaptic Package Manager (SPM), are programs to find and delete duplicate files that you can also install and use, and "fslint". Search for "duplicate".

dupeGuru, standard, music, or photo (images) - click links for Ubuntu

How to Find and Remove Duplicate Files on Linux ... -on-linux/

Hope this helps...

0 0
This question already has an answer here: Error message on Terminal launch 2 answers bash: /etc/profile.d/ No such file or directory bash: /etc/profile.d/ No such file or directory Alright guy's im close to solving my problem I just used sudo open /etc/profile and I found these two lines, when i try to edit, it says you do not have permission to make changes in this file and ask for making a duplicate... just tell me how to comment these lines with admin privileges. Solution which worked: "your last answer worked! I meant to say this I did: sudo nano /etc/profile put # before the two paths press command x saved the file" From the bash man page FILES /bin/bash The bash executable /etc/profile The systemwide initialization file, executed for login shells /etc/bash.bashrc The systemwide per-interactive-shell startup file /etc/bash.bash.logout The systemwide login shell cleanup file, executed when a login shell exits ~/.bash_profile The personal initialization file, executed...
0 0

It's been two weeks since I posted this. I have since gone through trying to close the listing, but that only resulted in removing it from my dashboard but it's still the primary listing on maps for the business, just not actually managed by anyone.

I was able to fix the misplaced map marker so at least both listings are at the correct address.

So now a Google employee knows about the duplicate listings, there has been no avenue provided to me or anyone else to remove a duplicate listing if someone controls both, and apparently, a Google employee knowing about it is not enough to remove the duplicate.


0 0

Brief: FSlint is a great GUI tool to find duplicate files in Linux and remove them. FDUPES also find the files with same name in Linux but in the command line way.

If you have this habit of downloading everything from the web like me, you will end up having multiple duplicate files. Most often, I can find the same songs or a bunch of images in different directories or end up backing up some files at two different places. It’s a pain locating these duplicate files manually and deleting them to recover the disk space.

If you want to save yourself from this pain, there are various Linux applications that will help you in locating these duplicate files and removing them. In this article, we will cover how you can find and remove these files in Ubuntu.

Note: You should know what you are doing. If you are using a new tool, it’s always better to try it in a virtual directory structure to figure out what it does before taking it to root or home folder. Also,...

0 0

The 'Open With' menu lets you open documents using a different application than the one associated with the document type. For instance, you may wish to open a JPEG image with Photoshop rather than Apple's Preview. You can easily do this by right-clicking the document (in our example, a JPEG image) and selecting 'Open With' from the pop-up menu. This is my favorite method for quickly opening documents in other applications. The 'Open With' menu will display all of the applications you have on your Mac that are capable of working with the selected document.

One drawback of the 'Open With' menu is that, over time, it can get very long, as you install and remove applications on your Mac. It can also start to display duplicates of applications. For instance, my 'Open With' menu displays four entries for Photoshop even though I only have one version of Photoshop on my Mac. The 'Open With' menu can fill up with duplicates each time you create a clone of your startup drive or mount...

0 0

This post has been updated in March 28, 2018

Duplicate files are one of the reasons that you run out of storage on your iMac or MacBook. You may wonder:

Why is my Mac duplicating files?

Well, there are multiple possibilities:

When you move a patch of images into your Mac and view them with Photos app, these photos have two copies: one in the folder that they are moved into, the others are in Photos Library.

We usually preview the email attachments before downloading the files. However, once you open an attachment, the Mail app has automatically downloaded a copy of the file. So you get two copies of the attachment if you manually download the file.

You download a photo or file twice without noticing it. There will be "(1)" in the file name of the duplicate.

You have moved some files to an external drive but forget to delete the original copies.

You can manually find out duplicate files on Mac OS X. However, just think of...

0 0

The terminal emulates any other terminal you might be used to using on your network. The only difference is that it’s accessed directly within Auvik so you don’t have to leave your Auvik dashboard to check or modify your devices.

The Auvik terminal auto-connects to devices using Secure Shell (SSH) by default. If SSH doesn’t work, then Auvik Telnets in using the IP address we have on record.

How to launch a terminal window

Launching a terminal connection opens a new browser tab or window, depending on how your browser is configured to handle new windows.

Note: The Terminal button is only enabled for devices that allow for connection by SSH or Telnet.

From a device dashboard, hover over the Remote Management button and click Terminal. Enter the required credentials, if requested. You could be prompted for either your Auvik password, or the SSH username and password for the device. After you’ve entered the credentials, click Connect.

How to use the...

0 0

Fedora Users: Refer to this article or use system menus: Applications | System | Terminal

Ubuntu Users: Type ALT-F2 and then enter "gnome-terminal" or use system menus: Applications | Accessories | Terminal

Kubuntu Users: Type ALT-F2 and then enter "konsole" or use system menus: "K" Menu | Applications | System | Konsole

SUSE Users: Use system menus: Computer Menu | More Applications | System | Terminal

MEPIS Users: Type ALT-F2 and then enter "konsole" or use system menus: "K" Menu | System | Terminal Program (Konsole)

Mandriva Users: Use system menus: Applications | Tools | Terminal

All others: Using the desktop system menu (generally in the upper left or lower left corner of the display), search for a program named "Terminal", "Console", "Konsole", etc. and run...

0 0

Ever been doing some work at the command line when you realized… it would be a lot easier if I could just use the mouse for this task? One command later, you’ll have a window open to the same place that you’re at.

This same tip works in more than one operating system, so we’ll detail how to do it in every way we know how.

Open a File Browser in Windows

We’ve actually covered this before when we told you how to open an Explorer window from the command prompt’s current directory, but we’ll briefly review: Just type the follow command into your command prompt:

explorer .

Note: You could actually just type “start .” instead.

And you’ll then see a file browsing window set to the same directory you were previous at. And yes, this screenshot is from Vista, but it works the same in every version of Windows.

If that wasn’t good enough, you should really read how you can navigate in the File Open/Save dialogs with just the...

0 0

You mean writing to a file using a shell script? Here are a few ways:

touch file

This method will simply create a file, but if the file already exists, it simply changes the modification date to the time you used that command.

echo "text" > file

That method overwrites the contents of file to text. If you wanted to clear a file, you can simply do this:

echo "" > file

Say you want to write more than one line to it, and you don't want to use thousands of echo commands, you would use this command:

cat file test test1 foo bar EOF

That enables you to write multiple lines in one command. The contents of file would then be this:

test test1 foo bar

If you wanted to append to a file, replace > to >>.

Hope this helps!

EDIT: Oh, I see, so you would write the file in gedit, using the .sh extension (optional, but it's a good idea), and then on a file manager, right click on the file, select Properties->Permissions, and check Allow executing file...

0 0

Hate passwords (sudo) and love one-liners?

For Ubuntu 14.10 or earlier:


/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop


/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

Other commands you may like:


/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

Hibernate: (if enabled on your system)

/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

For Ubuntu 15.04 and later:

(This is due to Ubuntu's shift in using systemd instead of Upstart)

systemctl poweroff systemctl reboot systemctl suspend systemctl hibernate systemctl hybrid-sleep...
0 0
0 0

In straight-up computer programming, there is no such thing as "printing bold text". Let's back up a bit and understand that your text is a string of bytes and bytes are just bundles of bits. To the computer, here's your "hello" text, in binary.


Each one or zero is a bit. Every eight bits is a byte. Every byte is, in a string like that in Python 2.x, one letter/number/punctuation item (called a character). So for example:

01101000 01100101 01101100 01101100 01101111 h e l l o

The computer translates those bits into letters, but in a traditional string (called an ASCII string), there is nothing to indicate bold text. In a Unicode string, which works a little differently, the computer can support international language characters, like Chinese ones, but again, there's nothing to say that some text is bold and some text is not. There's also no explicit font, text size, etc.

In the case of printing HTML, you're...

0 0

These terms and conditions govern your use of this website,; by using this website, you accept these terms and conditions in full. If you disagree with these terms and conditions or any part of these terms and conditions, you must not use this website.

You must be at least 18 years of age to use this website. By using this website and by agreeing to these terms and conditions you warrant and represent that you are at least 18 years of age.

License to use website

Unless otherwise stated, Swissport Lounge LLC and/or its licensors own the intellectual property rights in the website and material on the website. Subject to the license below, all these intellectual property rights are reserved.

You may view, download for caching purposes only, and print pages from the website for your own personal use, subject to the restrictions set out below and elsewhere in these terms and conditions.

You must not:

• republish material...

0 0

We respect its storied history, and value the contributions of its many readers, but we can no longer support it at the level it deserves. There’s a wealth of great information here that many will find useful, so we've elected to maintain it in a read-only form. Thanks for your many years of attention and everything you've done to make the site such a valuable resource.

You rated: 2 / 5 (3 votes cast)


I sometimes find the Java setup on my various Apple devices to be a mystery.

Recently, I was trying to get a Java applet to run in the same way on 2 iMacs and my MacBook Air. The applet is a simple vpn client from Juniper that lets me access a Citrix Desktop from any Mac that I can install the Citrix receiver client on so I can work on 'Company stuff' from a large screen iMac when I'm sat at home or from my MacBook when I'm on the road (it works fine over 3/4G).

The first thing is that you...

0 0

In my current project, I would like to run .bat or .exe file using button click event using JavaScript. The content of batch file is as shown below:

start "S:\" TemperatureSensor.exe

which start TemperatureSensor.exe file when TemperatureSensor button is clicked. Code for HTML page is shown below:

Click the button to make a BUTTON element with text.

Temperature Sensor

When I clicked on Temperature Sensor button, it should run Test.bat file but it just display following in new page:

Am I missing ?? Is it possible to run .exe file using button click event??

Updated: Code for HTML page is shown below:

Click the button to make a BUTTON element with text.

Temperature Sensor function myFunction() { var oShell = new ActiveXObject("Shell.Application"); var commandtoRun = "C:\\TemperatureSensor.exe"; if (inputparms != "") { var commandParms = document.Form1.filename.value; } // Invoke the execute method. ...
0 0